┌────────────────────────────────┐ │ ░░░ ░░▓ ░▓▓ ███ ▓▓░ ▓░░ │ │ ~ M O O N ~ │ └────────────────────────────────┘
prd-web-01.centraldc.gr
LOCATION:
/usr/share/doc/rpm/examples
☗ ROOT
↻ REFRESH
✎ EDIT FILE
EDITING: rpmls.py
#!/usr/bin/python3 # A simple rpm file list demonstration. # Accepts both installed and package files as arguments, lists contents # in `ls` style. import rpm import sys import stat import time def ls(h): for f in rpm.files(h): mode = stat.filemode(f.mode) mtime = time.strftime('%b %e %H:%M', time.localtime(f.mtime)) print('%s %2d %s %s %8d %s %s' % (mode, f.nlink, f.user, f.group, f.size, mtime, f.name)) if __name__ == '__main__': ts = rpm.ts() for arg in sys.argv[1:]: if arg.endswith('.rpm'): h = ts.hdrFromFdno(arg) ls(h) else: for h in ts.dbMatch('name', arg): ls(h)
CANCEL
Name
Type
Size
Modified
Actions
↩ ..
DIR
—
—
📄 rpmls.py
PY
698 B
2024-02-07 13:36
EDIT
📄 rpmunpack.py
PY
1.2 KB
2024-02-07 13:36
EDIT
📄 srpmspec.py
PY
826 B
2024-02-07 13:36
EDIT